<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h3 style="text-align: center">
    <a href="/web/">栏目管理</a>
    <a href="/web/topic_find">文章管理</a>
</h3>
<hr>
<form action="/web/category/add" method="post">
    {% csrf_token %}
    <table width="1000" align="center" border="1">
        <thead>
            <tr><td colspan="2">
                <a href="/web/category/add_input">添加栏目</a> <a href="/web/category/find">栏目列表</a>
            </td></tr>
        </thead>
        <tbody>
            <tr>
                <td>栏目名称:</td>
                <td><input type="text" name="name"></td>
            </tr>
            <tr>
                <td>栏目类型:</td>
                <td>
                    <select name="type" id="">
                        {% for t in type %}
                            <option value="{{ t.value }}">{{ t.name }}</option>
                        {% endfor %}
                    </select>
                </td>
            </tr>
            <tr>
                <td>栏目地址:</td>
                <td> <input type="text" name="href"></td>
            </tr>
            <tr>
                <td>是否是导航栏目:</td>
                <td>
                    <input type="radio" name="is_nav" value="True">是 <input checked type="radio" name="is_nav" value="False">否
                </td>
            </tr>
            <tr>
                <td>是否是首页新闻:</td>
                <td>
                    <input type="radio" name="is_index" value="True">是 <input checked type="radio" name="is_index" value="False">否
                </td>
            </tr>
            <tr>
                <td>排序号:</td>
                <td><input type="text" name="orders"></td>
            </tr>
            <tr>
                <td>父栏目</td>
                <td>
                    <select name="pid" id="">
                        <option value="0">选择父栏目</option>
                        {% for c in ps %}
                            <option value="{{ c.id }}">{{ c.name }}</option>
                        {% endfor %}
                    </select>
                </td>
            </tr>
            <tr>
                <td colspan="2" align="center">
                    <input type="submit" value="添加栏目">
                </td>
            </tr>
        </tbody>
    </table>
</form>
</body>
</html>